#include <iostream>
#include <map>

using namespace std;

void ShowMenu() {
    const map<int, string> menu = {
            {0, "退出通讯录"},
            {1, "添加联系人"},
            {2, "显示联系人"},
            {3, "删除联系人"},
            {4, "查找联系人"},
            {5, "修改联系人"},
            {6, "清空联系人"},
    };
    cout << "           通讯录          " << endl;
    cout << "***************************" << endl;
    for(auto &item : menu) {
        cout << "*****  " << item.first << "、" << item.second +"  *****" << endl;
    }
    cout << "***************************" << endl;
}

int main() {
    int select = 0;
    bool exitFlag = false;
    while (true) {
        ShowMenu();
        cout << "请输入你的选择：" << endl;
        cin >> select;
        switch (select) {
            case 0:
                cout << "欢迎下次使用" << endl;
                exitFlag = true;
                break;
            case 1:
                break;
            default:
                cout << "不支持的操作：【"<< select << "】" << endl;
                break;
        }
        if (exitFlag) {
            break;
        }
    }

    return 0;
}
